package com.boho.estates.department.action;


             
/**
 * 
 *
 * @File name:  CheckTDepartmentAction.java   检查【系统角色信息:T_DEPARTMENT】
 * @Create on:  2010-05-10 11:27:218
 * @Author   :  陈伟
 *
 * @ChangeList
 * ---------------------------------------------------
 * Date         Editor              ChangeReasons
 *
 */
           
        

            
import java.sql.Connection;

import cn.boho.framework.actions.ActionImp;
import cn.boho.framework.context.ActionContext;
import cn.boho.framework.po.DynaBeanMap;

import com.boho.common.Constant;
import com.boho.estates.department.dao.TDepartmentDao;




public class CheckTDepartmentAction extends ActionImp {
	
	private Connection con=null;
	
	@Override
	protected void doException(ActionContext atx, Exception ex) {
	}
	@Override
	protected int performExecute(ActionContext atx) throws Exception {
		con = atx.getConection();
		String departmentName = atx.getStringValue("DEPARTMENT_NAME").trim();
		String departIds  = (String)atx.getSessionValue(Constant.SESSION_DEPART_ARRAY);
		DynaBeanMap dbm = TDepartmentDao.getTDepartmentByName(con, departmentName, departIds);
		atx.setObjValue("T_DEPARTMENT", dbm);
		return 1;
	}
	@Override
	protected int verifyParameters(ActionContext atx) throws Exception {
		return 1;
	}
}
